<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <!-- 1. class绑定的时候 可以数组配合对象 -->
    <div v-bind:class="[active, 'active', {box: flag}]">内容</div>

    <!-- 2. 可以将我们的对象抽取成一个变量 -->
    <div v-bind:class="obj">简写</div>
    <div v-bind:class="arr">简写2</div>

    <!-- 3. class默认类名: 进行一个融合 -->
    <div class="container" v-bind:class="obj">默认</div>
  </div>
  <script src="./vue.js"></script>
  <script>
    new Vue({
      el: '#app',
      data: {
        flag: false,
        test: true,
        active: 'current',
        obj: {
          box: true,
          active: true,
          test: true
        },

        arr: [this.active, "active", {box: this.flag}, this.flag]
      }
    })
  </script>
</body>
</html>